package com.bootdo.common.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.bootdo.coach.service.TabDeviceService;

@Component
public class Task {
	private static final Logger logger = LoggerFactory.getLogger(Task.class);

	@Autowired
	private TabDeviceService deviceService;
	
	@Scheduled(cron = "0/10 * * * * ?") // 1分钟一次
	public void updateDeviceOnline() {
		deviceService.updateDeviceOnline();
	}
}
